"""

"""
import socket

socket_client = socket.socket()


socket_client.connect(("localhost",6688))
while True:
# 发送消息
    msg = input("请输入要发送给服务端的消息:")
    socket_client.send(msg.encode("UTF-8"))
    if msg == "exit":
        break
    # 接受消息
    recv_data = socket_client.recv(1024)
    print(f"服务端回复的消息是：{recv_data.decode('UTF-8')}")

# 关闭链接
socket_client.close()